package org.ax.service.plan.imple;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.ax.mapper.plan.ManufactureMapper;
import org.ax.pojo.plan.Manufacture;
import org.ax.service.plan.ManufactureService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * 编程人:赵浩鑫
 * 时间:2021-02-25-14:39
 */
@Service
public class IManufactureService extends ServiceImpl<ManufactureMapper, Manufacture> implements ManufactureService {
    @Override
    public Page<Manufacture> searchManufacturePage(Page page) {
        return getBaseMapper().selectPage(page, null);
    }

    @Override
    public boolean addManufacture(Manufacture manufacture) {
        return getBaseMapper().insert(manufacture)>0;
    }

    @Override
    public boolean updateManufacture(Manufacture manufacture) {
        return getBaseMapper().updateById(manufacture)>0;
    }

    @Override
    public boolean deletesManufacture(String[] ids) {
        return getBaseMapper().deleteBatchIds(Arrays.asList(ids))>0;
    }

    @Override
    public List<Manufacture> searchManufactures() {
        return getBaseMapper().selectList(null);
    }
}
